Optimal. Leaf size=113 \[ -\frac {i (c+d x)^3}{b}-\frac {(c+d x)^3 \cot (a+b x)}{b}+\frac {3 d (c+d x)^2 \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 i d^2 (c+d x) \text {Li}_2\left (e^{2 i (a+b x)}\right )}{b^3}+\frac {3 d^3 \text {Li}_3\left (e^{2 i (a+b x)}\right )}{2 b^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {4269, 3798,
2221, 2611, 2320, 6724} \begin {gather*} \frac {3 d^3 \text {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{2 b^4}-\frac {3 i d^2 (c+d x) \text {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^3}+\frac {3 d (c+d x)^2 \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {(c+d x)^3 \cot (a+b x)}{b}-\frac {i (c+d x)^3}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 3798
Rule 4269
Rule 6724
Rubi steps
\begin {align*} \int (c+d x)^3 \csc ^2(a+b x) \, dx &=-\frac {(c+d x)^3 \cot (a+b x)}{b}+\frac {(3 d) \int (c+d x)^2 \cot (a+b x) \, dx}{b}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^3 \cot (a+b x)}{b}-\frac {(6 i d) \int \frac {e^{2 i (a+b x)} (c+d x)^2}{1-e^{2 i (a+b x)}} \, dx}{b}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^3 \cot (a+b x)}{b}+\frac {3 d (c+d x)^2 \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {\left (6 d^2\right ) \int (c+d x) \log \left (1-e^{2 i (a+b x)}\right ) \, dx}{b^2}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^3 \cot (a+b x)}{b}+\frac {3 d (c+d x)^2 \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 i d^2 (c+d x) \text {Li}_2\left (e^{2 i (a+b x)}\right )}{b^3}+\frac {\left (3 i d^3\right ) \int \text {Li}_2\left (e^{2 i (a+b x)}\right ) \, dx}{b^3}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^3 \cot (a+b x)}{b}+\frac {3 d (c+d x)^2 \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 i d^2 (c+d x) \text {Li}_2\left (e^{2 i (a+b x)}\right )}{b^3}+\frac {\left (3 d^3\right ) \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^4}\\ &=-\frac {i (c+d x)^3}{b}-\frac {(c+d x)^3 \cot (a+b x)}{b}+\frac {3 d (c+d x)^2 \log \left (1-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 i d^2 (c+d x) \text {Li}_2\left (e^{2 i (a+b x)}\right )}{b^3}+\frac {3 d^3 \text {Li}_3\left (e^{2 i (a+b x)}\right )}{2 b^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(384\) vs. \(2(113)=226\).
time = 6.45, size = 384, normalized size = 3.40 \begin {gather*} -\frac {d^3 e^{-i a} \csc (a) \left (2 b^2 x^2 \left (2 b e^{2 i a} x+3 i \left (-1+e^{2 i a}\right ) \log \left (1-e^{2 i (a+b x)}\right )\right )+6 b \left (-1+e^{2 i a}\right ) x \text {Li}_2\left (e^{2 i (a+b x)}\right )+3 i \left (-1+e^{2 i a}\right ) \text {Li}_3\left (e^{2 i (a+b x)}\right )\right )}{4 b^4}+\frac {3 c^2 d \csc (a) (-b x \cos (a)+\log (\cos (b x) \sin (a)+\cos (a) \sin (b x)) \sin (a))}{b^2 \left (\cos ^2(a)+\sin ^2(a)\right )}+\frac {\csc (a) \csc (a+b x) \left (c^3 \sin (b x)+3 c^2 d x \sin (b x)+3 c d^2 x^2 \sin (b x)+d^3 x^3 \sin (b x)\right )}{b}-\frac {3 c d^2 \csc (a) \sec (a) \left (b^2 e^{i \tan ^{-1}(\tan (a))} x^2+\frac {\left (i b x \left (-\pi +2 \tan ^{-1}(\tan (a))\right )-\pi \log \left (1+e^{-2 i b x}\right )-2 \left (b x+\tan ^{-1}(\tan (a))\right ) \log \left (1-e^{2 i \left (b x+\tan ^{-1}(\tan (a))\right )}\right )+\pi \log (\cos (b x))+2 \tan ^{-1}(\tan (a)) \log \left (\sin \left (b x+\tan ^{-1}(\tan (a))\right )\right )+i \text {Li}_2\left (e^{2 i \left (b x+\tan ^{-1}(\tan (a))\right )}\right )\right ) \tan (a)}{\sqrt {1+\tan ^2(a)}}\right )}{b^3 \sqrt {\sec ^2(a) \left (\cos ^2(a)+\sin ^2(a)\right )}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 540 vs. \(2 (103 ) = 206\).
time = 0.07, size = 541, normalized size = 4.79
method | result | size |
risch | \(\frac {6 d^{3} \polylog \left (3, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}+\frac {6 d^{3} \polylog \left (3, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}+\frac {3 d \,c^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{b^{2}}-\frac {6 d^{3} a^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}+\frac {3 d^{3} a^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{4}}+\frac {3 d \,c^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{2}}-\frac {6 d \,c^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x^{2}}{b^{2}}-\frac {3 d^{3} a^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}+\frac {3 d^{3} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b^{2}}-\frac {2 i d^{3} x^{3}}{b}+\frac {4 i d^{3} a^{3}}{b^{4}}-\frac {2 i \left (d^{3} x^{3}+3 c \,d^{2} x^{2}+3 c^{2} d x +c^{3}\right )}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}-\frac {12 i d^{2} c a x}{b^{2}}-\frac {6 i d^{2} c \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {6 d^{2} c \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{3}}+\frac {6 d^{2} c \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b^{2}}+\frac {6 d^{2} c \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {12 d^{2} c a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {6 d^{2} c a \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{3}}+\frac {6 i d^{3} a^{2} x}{b^{3}}-\frac {6 i d^{2} c \,x^{2}}{b}-\frac {6 i d^{2} c \,a^{2}}{b^{3}}-\frac {6 i d^{3} \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{3}}-\frac {6 i d^{3} \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{3}}-\frac {6 i d^{2} c \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}\) | \(541\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 1654 vs. \(2 (100) = 200\).
time = 0.43, size = 1654, normalized size = 14.64 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 676 vs. \(2 (100) = 200\).
time = 0.40, size = 676, normalized size = 5.98 \begin {gather*} \frac {6 \, d^{3} {\rm polylog}\left (3, \cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + 6 \, d^{3} {\rm polylog}\left (3, \cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + 6 \, d^{3} {\rm polylog}\left (3, -\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + 6 \, d^{3} {\rm polylog}\left (3, -\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - 6 \, {\left (i \, b d^{3} x + i \, b c d^{2}\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - 6 \, {\left (-i \, b d^{3} x - i \, b c d^{2}\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - 6 \, {\left (-i \, b d^{3} x - i \, b c d^{2}\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - 6 \, {\left (i \, b d^{3} x + i \, b c d^{2}\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) - 2 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3}\right )} \cos \left (b x + a\right )}{2 \, b^{4} \sin \left (b x + a\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right )^{3} \csc ^{2}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (c+d\,x\right )}^3}{{\sin \left (a+b\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________